package com.haoshuang.zhouzhoubang.ui.page.message.child.order

import com.haoshuang.zhouzhoubang.databinding.ItemOrderMessageBinding
import com.haoshuang.zhouzhoubang.model.bean.MasterStoreOrderBean
import com.mufeng.libs.base.BaseBindingHolder
import com.mufeng.libs.base.BaseBindingQuickAdapter
import com.mufeng.libs.utils.view.visibleOrGone


/**
 *
 */
class OrderMessageAdapter(data: MutableList<MasterStoreOrderBean>) :
    BaseBindingQuickAdapter<MasterStoreOrderBean, ItemOrderMessageBinding>(data) {

    override fun onBindViewHolder(
        holder: BaseBindingHolder,
        position: Int,
        item: MasterStoreOrderBean?
    ) {
        holder.getViewBinding<ItemOrderMessageBinding>().apply {
            llReadedLine.visibleOrGone(item?.isFirstRead == true)

            tvStatus.text = item?.servie_name
            tvTime.text = item?.add_time
            tvServiceName.text = item?.store_name
            tvServiceTime.text = item?.service_day_time_text
            tvServiceAddress.text = item?.user_address
            viewUnRead.visibleOrGone(item?.is_read == 0)
        }
    }

}